<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
</body>
<script>
    let obj = {
        name: 123,
        myFunc: 'hello'
    }
    Function.prototype.myCall = function(thisObj, ...args) {
        // 执行一个函数
        // 拿到函数
        let Func = this
        // 修改函数内部的this，并且执行
        let s = Symbol('myFunc')
        // let s2 = Symbol('myFunc')
        let sArr = Object.getOwnPropertySymbols(thisObj)
        delete thisObj[sArr[0]]
        thisObj[s]=Func
        thisObj[s](args)
    }
    test.myCall(obj, 1,2,3)
</script>
</html>